Skip to content

Conversation

Copy link

Copilot AI commented Feb 2, 2026

Extends #3 by converting the header update script into a CI check that validates all Python files have the standard FMPose3D header with Apache 2.0 license.

Changes

  • Enhanced scripts/update_headers.py:

    • Added --check mode for non-destructive validation
    • Now adds headers to files without them (previously only replaced old headers)
    • Handles from __future__ imports and shebangs correctly
    • Flexible matching allows files with additional documentation blocks
  • New GitHub Action (.github/workflows/check-headers.yml):

    • Runs on all pushes and PRs to main
    • Fails CI if headers are missing or incorrect
    • Minimal permissions (contents: read)
  • Applied headers to 56 Python files throughout the repository

Usage

# Check headers (CI mode)
python scripts/update_headers.py --check

# Fix headers locally
python scripts/update_headers.py

The action ensures all future contributions maintain consistent licensing attribution and project branding.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits February 2, 2026 15:13
Co-authored-by: MMathisLab <28102185+MMathisLab@users.noreply.github.com>
… files

Co-authored-by: MMathisLab <28102185+MMathisLab@users.noreply.github.com>
…ript to handle special cases

Co-authored-by: MMathisLab <28102185+MMathisLab@users.noreply.github.com>
…ng in script

Co-authored-by: MMathisLab <28102185+MMathisLab@users.noreply.github.com>
Co-authored-by: MMathisLab <28102185+MMathisLab@users.noreply.github.com>
Copilot AI changed the title [WIP] Make header script a GitHub Action for all files Add GitHub Action for automatic Python file header validation Feb 2, 2026
Copilot AI requested a review from MMathisLab February 2, 2026 15:23
@MMathisLab MMathisLab marked this pull request as ready for review February 2, 2026 18:03
@MMathisLab MMathisLab merged commit 39720a7 into main Feb 2, 2026
4 checks passed
@MMathisLab MMathisLab deleted the copilot/make-header-script-global branch February 2, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants